<%--
  Created by IntelliJ IDEA.
  User: 28797
  Date: 2022/10/21
  Time: 11:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>确认订单</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/myOrder_confirm.css">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/head_daohang.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.min.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js"></script>
</head>
<body>
<!-- 公用头部 -->
<div id="head">
    <div class="layui-col-md2">
        <div class="grid-demo ">
            <div class="head-logo"></div>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/index.jsp" class="word-1">首页</a></div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/car/getCarView" class="head-hover word-1">自驾租车</a>
        </div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/long_time_older/long_time.jsp" class="head-hover word-1">长租专区</a>--%>
    <%--        </div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href=" ${pageContext.request.contextPath}/carOutlets/carAllList" class="head-hover word-1">车型查询</a>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/Offline_outlets/Business_outlets.jsp" class="head-hover word-1">营业网点</a></div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="" class="head-hover word-1">会员专区</a></div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo1">
            <i class="login-icon"></i>
            <a href="${pageContext.request.contextPath}/login/login.jsp" class="head-color">登录/注册</a>
        </div>
        <div class="tel">
            <i class="tel-icon"></i>
            <span class="tel-num">110-119-1111</span>
        </div>
    </div>
</div>


<div class="payment-box">
    <!-- 支付时间提醒 -->
    <div class="payment_time">
        <div class="Bdiv time_pic"><img src="${pageContext.request.contextPath}/images/payment_tip.png"></div>
        <div class="Bdiv time_tip"></div>
    </div>

    <!-- 主要内容 -->
    <div class="main">

        <div class="payment-tip">
            <p>
                <img src="../images/step3_icon.png">
            </p>
            <p>
                订单提交成功！
                <span>取车时请务必携带</span>
                <span class="tip-special">本人信用卡，本人二代有效身份证，本人有效地方驾驶证正副本</span>
            </p>
        </div>


            <div class="payment_det">
                <table>
                    <tr>
                        <td>订单号：<span>${result.data.orderNo}</span></td>
                        <td>支付方式：在线支付</td>
                        <td>订单总价：<em class="price_special">￥</em><span class="price_special">${result.data.orderPrice}</span></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>
                        <td>已支付：￥0.00 &nbsp;&nbsp;
                            未支付：<em class="price_special">￥</em><span class="price_special">${result.data.orderPrice}</span>
                        </td>
                    </tr>
                </table>
            </div>

            <div class="payment_action">
                <a class="pay-continue" href="http://localhost:8080/wy_car_rental/alipay/pay?subject=车辆租赁&traceNo=${result.data.orderId}&totalAmount=${result.data.orderPrice}">继续支付</a>
                <a href="${pageContext.request.contextPath}/index.jsp">返回首页</a>
                <a href="${pageContext.request.contextPath}/orders/getwaitPay/${result.data.orderNo}">查看订单</a>
            </div>



    </div>
</div>

<!-- 尾部 -->
<div class="footer">
    <div class="footer-box">
        <div class="footer-left">
            <p>
                <span>关于无忧</span> |
                <span>移动客户端</span> |
                <span>帮助中心</span> |
                <span>建议专区</span> |
                <span>联系我们</span> |
                <span>友情连接</span> |
                <span>投诉通道：400-821-1608</span>
            </p>
            <p>
                <span>Copyright © 2007-2022 苏州无忧信息技术服务有限公司 ICP证：苏B2-20140130|苏ICP备08010394号-1</span>
            </p>
        </div>
        <div class="footer-right"></div>
    </div>
</div>

<script src="${pageContext.request.contextPath}/js/myOrder_confirm.js"></script>
<script>
    loadInitData();

    function loadInitData(){
        console.log("00000000000000")
        var token = localStorage.getItem("token");
        // ----->cpmtollrt toke 你=-----
        console.log("token-----:"+token)

        $.ajax({
            type: "get",
            url: "${pageContext.request.contextPath}/customer/personalData",
            headers: {"token": token},
            success: function (result) {
                console.log(result);
                var loginUser = result.data.loginCustomer;

                if(loginUser != null) {
                    $(".head-color").text(loginUser.custName);
                    $(".head-color").attr("href", "${pageContext.request.contextPath}/customer/getId/" + loginUser.custId)
                    $(".crumbs-person").attr("href","${pageContext.request.contextPath}/customer/getId/" + loginUser.custId)
                }else{
                    console.log("2222222")
                    $(".head-color").text("登录");
                    $(".head-color").attr("href", "login/login.jsp");
                }
            }
        })
    }
</script>

</body>
</html>